/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ProcesamientoImagenes.classes;

import imageProcessing.classes.GeneralBufferedImageMaker;
import ProcesamientoImagenes.interfaces.BufferedImageMaker;
import ProcesamientoImagenes.interfaces.MaskMaker;
import java.awt.image.BufferedImage;
import java.net.MalformedURLException;
import java.net.URL;
import javax.imageio.ImageIO;

/**
 *
 * @author damfercer
 */
public class StaticMaskMaker implements MaskMaker{
    private BufferedImageMaker bim;
    private URL maskUrl;
    
    public StaticMaskMaker(String path) throws MalformedURLException{
        bim=new GeneralBufferedImageMaker();
        this.maskUrl=new URL(path);
        
    }
    public StaticMaskMaker(URL url){
        bim=new GeneralBufferedImageMaker();
        this.maskUrl=url;
    }
    @Override
    public BufferedImage getMaskFromImage() {
        return bim.getBufferedImageFromUrl(maskUrl);
    }
    
}
